<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'book-form',
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'), //fájlfeltöltéshez
            ));
    ?>

    <p class="note">A <span class="required">*</span> -al jelölt mezők kitöltése kötelező.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'name'); ?>
        <?php echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 128)); ?>
        <?php echo $form->error($model, 'name'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'author'); ?>
        <?php echo $form->textField($model, 'author', array('size' => 60, 'maxlength' => 64)); ?>
        <?php echo $form->error($model, 'author'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'description'); ?>
        <?php echo $form->textArea($model, 'description', array('rows' => 6, 'cols' => 50)); ?>
        <?php echo $form->error($model, 'description'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'isbn'); ?>
        <?php echo $form->textField($model, 'isbn', array('size' => 12, 'maxlength' => 12)); ?>
        <?php echo $form->error($model, 'isbn'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'picture_url'); ?>
        <?php echo $form->fileField($model, 'image'); ?><!--fájlfeltöltéshez-->
        <?php echo $form->error($model, 'picture_url'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Létrehozás' : 'Mentés'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->